<include file="Public/header"/>

<div id="app">
    <!-- sidebar -->
    <include file="Public/left"/>
    <!-- / sidebar -->
    <div class="app-content">
        <!-- start: TOP NAVBAR -->
        <include file="Public/headernav"/>
        <!-- end: TOP NAVBAR -->
        <div class="main-content">
            <div class="wrap-content container" id="container">
                <!-- start: PAGE TITLE -->
                <section id="page-title">
                    <div class="row">
                        <div class="col-sm-8">
                            <h1 class="mainTitle">{$msgtitle}</h1>
                            <span class="mainDescription">&nbsp;&nbsp;代理列表 </span>
                        </div>
                        <nav id="cl-effect-10" class="links cl-effect-10">
                            <a data-hover="新增" href="{:U('admin/agent/agent_edit')}"><span>新增</span></a>

                        </nav>
                        <!-- <ol class="breadcrumb">
                            <li>
                                <span>Pages</span>
                            </li>
                            <li class="active">
                                <span>Blank Page</span>
                            </li>
                        </ol> -->
                    </div>
                </section>
                <!-- end: PAGE TITLE -->
                <!-- start: YOUR CONTENT HERE -->
                <div class="row">
                    <div class="col-lg-12 col-md-12 margin-top-20">
                        <div class="panel panel-white">
                            <div class="panel-heading">
                                <h5 class="panel-title">筛选</h5>
                            </div>
                            <form role="form" class="form-inline">
                                <div class="panel-body">
                                    <div class="form-group">
                                        <label for="member_name" class="sr-only">
                                            用户名
                                        </label>
                                        <input type="text" name="member_name" value="{$_GET.member_name}"
                                               id="member_name"
                                               placeholder="用户名" class="form-control">
                                    </div>
                                    <div class="form-group">
                                        <label for="mobile" class="sr-only">
                                            手机号
                                        </label>
                                        <input type="text" name="mobile" value="{$_GET.mobile}" id="mobile"
                                               placeholder="手机号" class="form-control">
                                    </div>
                                    <div class="form-group">
                                        <label for="member_card" class="sr-only">
                                            会员号
                                        </label>
                                        <input type="text" name="member_card" value="{$_GET.member_card}"
                                               id="member_card"
                                               placeholder="会员号" class="form-control">
                                    </div>
                                    <div class="form-group">
                                        <label for="status" class="sr-only">
                                            状态
                                        </label>
                                        <select class="form-control" id="status" name="status">
                                            <option value="">状态</option>
                                            <option value="0"
                                            <if condition="$_GET['status'] eq 0">selected</if>
                                            >无效</option>
                                            <option value="1"
                                            <if condition="$_GET['status'] eq 1">selected</if>
                                            >有效</option>
                                        </select>
                                    </div>
                                    <div class="form-group  ">
                                        <button class="btn btn-primary" type="submit">
                                            提交
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <table class="table table-hover" id="sample-table-1">
                    <thead>
                    <tr>
                        <th class="center">#</th>
                        <th class="center">用户名</th>
                        <th class="center">用户卡号</th>
                        <th class="center">手机号</th>
                        <th class="center">代理区域</th>
                        <th class="center">返点比例</th>
                        <th class="center">状态</th>
                        <th class="center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="list" id='vo'>
                        <tr>
                            <td class="center">#</td>
                            <td class="center">{$vo.member_name}</td>
                            <td class="center">{$vo.member_card}</td>
                            <td class="center">{$vo.mobile}</td>
                            <td class="center">{$vo.agent_region}</td>
                            <td class="center">{$vo['rate']*100}%</td>
                            <td class="center">{$vo['status']?'有效':'无效'}</td>
                            <td class="center">
                                <a href="{:U('admin/agent/agent_edit',array('id'=>$vo['id']))}"
                                   class="btn btn-transparent btn-xs" tooltip="Edit" tooltip-placement="top"
                                   data-toggle="tooltip" data-original-title="编辑">
                                    <i class="fa fa-pencil"></i></a>
                                <a href="{:U('admin/agent/agent_del',array('id'=>$vo['id']))}"
                                   class="btn btn-transparent btn-xs" tooltip="Edit" tooltip-placement="top"
                                   data-toggle="tooltip" onclick="return confirm('确取删除该代理？')"
                                   data-original-title="删除"><i class="fa fa-trash-o"></i></a>
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>


                <div class="col-md-12 pages" align="center">{$page|default='暂无数据'}</div>


                <!-- end: YOUR CONTENT HERE -->
            </div>
        </div>
    </div>
    <!--  FOOTER and SETTINGS -->

    <include file="Public/footer"/>
    <!-- end: FOOTER -->
    <!-- start: OFF-SIDEBAR -->

    <!-- end: OFF-SIDEBAR -->

</div>
<!-- start: MAIN JAVASCRIPTS -->

<include file="Public/javascript"/>
<include file="Public/javascript_datepicker"/>

</body>
<script type="text/javascript">
</script>
</html>
